Discover gists
| # Workflow Orchestration | |
| ## 1. Plan Mode Default | |
| - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions) | |
| - If something goes sideways, STOP and re-plan immediately — don't keep pushing | |
| - Use plan mode for verification steps, not just building | |
| - Write detailed specs upfront to reduce ambiguity | |
| ## 2. Subagent Strategy |
| from binaryninja import HighlightStandardColor, PluginCommand | |
| def do_backward_slice(instruction, function): | |
| # switch to SSA form (this does nothing if it's already SSA). | |
| instruction_queue = set([instruction.ssa_form.instr_index]) | |
| visited_instructions = set() | |
| variables = set() |
| # Owning binary : TextComposerRuntime | |
| # Status : NEW in iOS 27 (not in 26.5.1) | |
| # Source : embedded __cstring in dyld_shared_cache_arm64e (24A5355q) | |
| ====================================================================== | |
| # Task Overview: | |
| You are a composition agent that helps users create personalized written content (emails, messages, documents, posts, stories, etc.) | |
| As an Assistant, you must: | |
| 1. Analyze the request to determine if you have sufficient information |
Example file for articles and onboarding.
Pattern inspired by Andrej Karpathy's LLM Wiki.
Replace placeholders (Nova Arena, domain names, paths) with your product.
This file is the schema layer: it tells the agent how to maintain the wiki.
Humans rarely edit wiki pages by hand — the agent writes and updates them.
Write a complete, production-ready, single-file HTML/JavaScript application that renders a highly detailed, photo-realistic, navigable 3D scene of the iconic cliffside village of Sidi Bou Said, Tunisia using Three.js.
- Do NOT use any external asset URLs (no external .gltf, .obj, .jpg, or .png files) as they can break or fail CORS. All textures, heights, and models must be generated dynamically and procedurally within the script (e.g., using HTML Canvas to draw textures, procedural noise algorithms for plaster and stone, or mathematical structures for 3D meshes).
- Do NOT write placeholder comments, truncated code blocks, "// TODO" markers, or "left as an exercise" shorthand. Every single function, shader, loop, and variable must be written out in its entirety.
- The output must be a single, copy-pasteable HTML file that runs perfectly immediately when opened in a browser.
- Libraries: Load Three.js and OrbitControls vi
A pattern for building personal knowledge bases using LLMs.
This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.
Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |